Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sling-web-component-input

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sling-web-component-input

## Install

  • 0.10.1
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

sling-web-component-input

Install

npm instal sling-web-component-input 

Tag

<sling-input></sling-input>      

Dependencies

  • sling-web-framework
  • sling-web-helpers

Attributes and properties

NameTypeDefault valueReflectToAttributeObservercallSdk
autocompleteString:heavy_check_mark:
checkedBoolean:heavy_check_mark:
disabledBoolean:heavy_check_mark:
labelString:heavy_check_mark:
typeStringtext:heavy_check_mark:formatType
maxNumber:heavy_check_mark:
maxlengthNumber:heavy_check_mark:
minNumber:heavy_check_mark:
minlengthNumber:heavy_check_mark:
nameString:heavy_check_mark:
patternString:heavy_check_mark:
placeholderString:heavy_check_mark:
readonlyBoolean:heavy_check_mark:
requiredBoolean:heavy_check_mark:
sizeNumber:heavy_check_mark:
srcString:heavy_check_mark:
stateString:heavy_check_mark:
stepNumber:heavy_check_mark:
validationmessageObject:heavy_check_mark:
valueString:heavy_check_mark:formatValue

Description

NameDescription
autocompleteIndicates whether the control value can be automatically completed by the browser, is ignored if value of type attribute is hidden, password, checkbox, radio, file or button type (button, submit, reset, image). More information on input HTML.
checkedWhen the value of the type attribute is radio or checkbox, the presence of this Boolean attribute indicates that the control is selected by default; otherwise, this attribute is ignored. More information on input HTML.
disabledIndicates that form control is not available for interaction. More information on input HTML.
labelReceives the text that will be used as input label.
typeThe type of control to be displayed. The property receives all the options of a input HTML.
maxThe maximum value (numeric or date) for this item, which should not be less than its minimum value (min attribute).More information on input HTML.
maxlengthIf the value of the ** type ** attribute is text, email, search, password, tel or url, this attribute specifies the maximum number of characters (in Unicode code points) that the user can insert. More information on input HTML.
minThe minimum value (number or date) for this item, which should not be greater than its maximum (max attribute). More information on input HTML.
minlengthIf the value of the ** type ** attribute is text, email, search, password, tel or url, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter. More information on input HTML.
nameThe name of the control, which is sent along with the form data.
oninputA function that is called when populated the field, it triggers an input event that loads an object with field information.
patternA regular expression used to validate the value of the control. More information on input HTML.
placeholderA hint to the user of what he can enter in the control. More information on input HTML.
readonlyThis Boolean attribute indicates that the user can not modify the value of the control. More information on input HTML.
requiredThis attribute specifies that the user must fill in the field with a value before submitting the form. More information on input HTML.
sizeThe initial size of the control. More information on input HTML.
srcIf the value of the type attribute is image, this attribute specifies a URI for the location of an image to be displayed on the graphic button. More information on input HTML.
stateControls the state of input field, its values ​​may vary in success warning and error
stepWorks together with min and max attributes to limit increments in which numeric values ​​or dates can be changed. More information on input HTML.
validationmessageReceives an object with the validation message from the parent.
valueThe initial value of control. This attribute is optional except when the value of the type attribute is radio or checkbox. More information on input HTML.

Events

  • input

Description: Event triggered when field is populated, has the values and field type as properties.

Details:

NameDescription
valueValue of input field that will be passed to the parent.
typeType of input field that will be passed to the parent.

Examples

All component examples can be emulated using the npm start sling-web-component-input command.

Use

<sling-input label="Label" placeholder="Placeholder..."></sling-input>      

image

<sling-input label="Disabled" placeholder="Placeholder..." disabled></sling-input>      

image

<sling-input label="Success" placeholder="Placeholder..." state="success"></sling-input>      

image

FAQs

Package last updated on 31 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc